package com.ipkiss.incomespringboot.service.impl;

import com.ipkiss.incomespringboot.entity.FundEntity;
import com.ipkiss.incomespringboot.entity.OperateEntity;
import com.ipkiss.incomespringboot.mapper.FundMapper;
import com.ipkiss.incomespringboot.service.IFundInfoService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author WuYongheng
 * @date 2024/5/11
 * @describe
 */
@Service
@Transactional
public class FundInfoService implements IFundInfoService {
    @Resource
    private FundMapper fundMapper;

    @Override
    public List<OperateEntity> getTableData() {
        return fundMapper.getTableData();
    }

    @Override
    public List<FundEntity> getFundsData() {
        return fundMapper.getFundsData();
    }

    @Override
    public int createOperateInfo(OperateEntity operateEntity) {
        return fundMapper.createOperateInfo(operateEntity);
    }

    @Override
    public int updateOperateInfo(OperateEntity operateEntity) {
        return fundMapper.updateOperateInfo(operateEntity);
    }

    @Override
    public int deleteOperateInfo(int id) {
        return fundMapper.deleteOperateInfo(id);
    }

    @Override
    public List<OperateEntity> getFundListByKeyword(String keyword) {
        return fundMapper.getFundListByKeyword(keyword);
    }

    @Override
    public Double getSumMoney() {
        return fundMapper.getSumMoney();
    }
}
